﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;

public partial class UserControl_MyMainIndexControl : System.Web.UI.UserControl
{
    List<TIN_RAO_VAT> list ;
    int index = 0;
    protected void Page_Load(object sender, EventArgs e)
    {
        list = new List<TIN_RAO_VAT>();
        LinQ_RaoVatDataContext linQ = new LinQ_RaoVatDataContext();
        var query = from tinraovat in linQ.TIN_RAO_VATs
                    where tinraovat.Deleted == false
                    select tinraovat;

        list = query.Take(5).ToList();

        
           
            GridView1.DataSource = list;
            FormView1.DataSource = list;
            GridView1.DataBind();
            FormView1.DataBind();
        
    }
    protected void FormView1_PageIndexChanging(object sender, FormViewPageEventArgs e)
    {

    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
      
       if ( ++FormView1.PageIndex == FormView1.PageCount)
       {
           FormView1.PageIndex = 0;
       }
       
        
      
     
    }
}
